<?php

namespace api\modules\sms\models;

use Yii;

/**
 * This is the model class for table "{{%who_sms_log}}".
 *
 * @property integer $id
 * @property string $mobile
 * @property string $query_url
 * @property integer $log_time
 * @property integer $status
 * @property string $return_message
 * @property integer $channel
 * @property string $content
 * @property integer $source_id
 * @property integer $type
 */
class WhoSmsLog extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%who_sms_log}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['log_time', 'status', 'channel', 'source_id', 'type'], 'integer'],
            [['channel', 'content', 'source_id', 'type'], 'required'],
            [['mobile'], 'string', 'max' => 20],
            [['query_url'], 'string', 'max' => 500],
            [['return_message'], 'string', 'max' => 300],
            [['content'], 'string', 'max' => 78]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'mobile' => 'Mobile',
            'query_url' => 'Query Url',
            'log_time' => 'Log Time',
            'status' => 'Status',
            'return_message' => 'Return Message',
            'channel' => 'Channel',
            'content' => 'Content',
            'source_id' => 'Source ID',
            'type' => 'Type',
        ];
    }

}
